0.1 Analysis of mortality rates based on several input variables

The rampant Covid-19 virus has mankind firmly in its grip. And even though many have gotten used to this state of helplessness in the meantime, that was quite different in the beginning. Especially the months of March and April were characterized by panic and uncertainty. It was said to be a killer virus - a mixture of misinformation and sheer ignorance. So it seems more important than ever to rely on facts and observe the situation in a neutral light. How deadly is the virus in reality? How does this mortality rate vary depending on the age and sex of the patients? This will be examined in the following paragraphs through the detailed analysis of a COvid-19 data set.

Specifically, we want to see the death rate of patients by gender and sex and whether they had co-morbidities or not, besides whether the patients were admitted to the Intensive Care Unit (ICU) or not.

# file contains 11 variables and 3.66m rows and is well over 380Mb. 
# It will take time to download

# URL link to CDC to download data
url <- "https://data.cdc.gov/api/views/vbim-akqf/rows.csv?accessType=DOWNLOAD"

covid_data <- read_csv(url)%>% # If vroom::vroom(url) doesn't work, use read_csv(url)
  clean_names()

cleaned_data <- covid_data %>% 
  filter(death_yn %in% c("Yes", "No")) %>% #to remove non-meaningful value in death_yn.
  filter(medcond_yn %in% c("Yes","No") & icu_yn %in% c("Yes", "No")) %>% #to remove non-meaningful value in medcond_yn and icu_yn.
  filter(age_group!="Unknown") %>%  #to remove non-meaningful value in age_group.
  filter(sex %in% c("Male","Female")) %>% 
    mutate(
    medcond_yn=case_when(
      medcond_yn=="Yes" ~ "With comorbidities",
      medcond_yn=="No" ~ "Without comorbidities"
    ),
    icu_yn=case_when(
    icu_yn=="Yes" ~ "Admitted to ICU",
    icu_yn=="No" ~ "No ICU"
    ))

We start with the first graph that has a look at death rates by gender, sex and whether the patient had co-morbidities or not. See below:

cleaned_data %>% 
  group_by(sex, medcond_yn, age_group) %>% 
  summarise(death_num = count(death_yn=="Yes"), total_num =n(), death_rate = death_num/n()) %>% 
  
  ggplot(aes(x=death_rate,y=reorder(age_group, death_rate)))+
    geom_col(fill="#003366")+
    theme_bw() +
    labs (title = "Covid death % by age group, sex and with or without co-morbidities", x="", y="") +
    geom_text(aes(label=round(death_rate*100,1)), hjust=-0.1, size=3)+ #ajust size, position, and decimal for barlabels.
    facet_grid(medcond_yn ~ sex)+ #get the 2x2 combined plot, vertical medcond_yn and horizontal sex.
    scale_x_continuous(limits=c(0,0.85),breaks=seq(0,0.8,0.2),label=scales::percent)+ #make all labels in the plot and  axis label percent.
    theme(plot.margin = unit(c(0.1,0.1,0.1,0.1),"cm"))

As the graph shows, there are fundamental differences that need to be addressed. First of all, we can we (something we know from the media already), that the mortality varies by age. While people between the ages of 0-29 are hardly affected by Covid-19, it seems to be really dangerous fo the 80+ generation. Even without co-morbidities, c. 25% of women and c. 31% of men died. A shocking result. Besides just focusing on the rates itself, this difference between men and women is also interesting. While there could be multiple other reasons, one explanation for the gap is, that women tend to have a stronger immune system than men and also get significantly older. The Coid-19 virus might therefore not affect them as much as the male population of the same age. It would require a more intensive research on the dataset to come to state a valid assumption though.

Secondly, we can really see the effect of co-morbidities on the overall death rate, as shown in the charts in the first row. While the mortality rate of women increases by c. 18% with this additional variable compared to no co-morbidities, it almost doubles for the men in the group of 80+ years. This horrific scenario really shows the severity of the virus and is per se an important reason why all of us should support the new hygiene regulations, especially in countries struggling like the UK.

Lastly we want to see if the fact that patients had to be treated in the intensive care unit had an impact on the death rate.

cleaned_data %>% 
  group_by(sex, icu_yn, age_group) %>% 
  summarise(death_num = count(death_yn=="Yes"), total_num =n(), death_rate = death_num/n()) %>% 
  
  ggplot(aes(x=death_rate,y=reorder(age_group, death_rate)))+
    geom_col(fill="#FF9999")+
    theme_bw() +
    labs (title = "Covid death % by age group, sex and whether patient was admitted to ICU", x="", y="") +
    geom_text(aes(label=round(death_rate*100,1)), hjust=-0.1, size=3)+
    facet_grid(icu_yn ~ sex)+ #get the 2x2 combined plot, vertical icu_yn and horizontal sex.
    scale_x_continuous(limits=c(0,0.85),breaks=seq(0,0.8,0.2),label=scales::percent)+
    theme(plot.margin = unit(c(0.1,0.1,0.1,0.1),"cm"))

This new input variable, the ICU, shows how severe the situation really is in the hospitals. Even among the 30-39 year old’s 36.3% of males and 23.8% of females sent to intensive care die from the virus. As opposed to the graph before, here we can see that Covid-19 really has an impact on all age groups and one should be really worried if a relative gets sent to ICU because of a Covid-19 infection. For males and females above 80, the data is truly horrific and just c. 20% of those sent to ICU, survive.

0.2 Conclusion

Overall, the analysis of the data set shows shocking results.Not only does the pure existence of co-morbidities significantly increase the Covid-19 risks for patients, in particular among the age groups 70-79 and 80+, but especially for males in higher ages the chances of dying from an infection almost double to over 50%. Besides that,the numbers considering patients on the intensive care station really show how severe the situation must have been there throughout the months of March and April. This finding was very well reflected in the situation Italy found itself in in during this time frame. Due to an overload of hospitals and intensive care beds, people of advanced age were turned away at the doors and sent home to die. A terrible scenario, which we and all European countries will hopefully be spared from in the coming months.